﻿package plugin.wing.controller
{
    import plugin.wing.ui.*;

    public class WingLuckControl extends Object
    {
        private var mUI:WingUIControl;
        private var cfgWingLevel:Array;
        private var w:int = 0;

        public function WingLuckControl(param1:WingUIControl)
        {
            this.cfgWingLevel = ConfigDictionary.data.newwinglevel;
            this.mUI = param1;
            return;
        }// end function

        public function updateProgress(param1:int) : void
        {
            var _loc_2:* = int(this.cfgWingLevel[this.ui.horseData.level].luckmax);
            if (this.w >= _loc_2)
            {
                this.w = _loc_2;
            }
            this.ui.imgProgress.width = param1 / _loc_2 * 200;
            if (this.ui.horseData.level == 15)
            {
                this.ui.imgProgress.width = 0;
            }
            return;
        }// end function

        private function get ui() : WingUIControl
        {
            return this.mUI;
        }// end function

    }
}
